]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
polkitAgent: Allow malcontent action when locked
authorIgnacy Kuchciński <ignacykuchcinski@gnome.org>
Sat, 3 Jan 2026 15:17:45 +0000 (16:17 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 14 Jan 2026 14:41:48 +0000 (15:41 +0100)
Allow org.freedesktop.Malcontent.SessionLimits.Extend action id when
screen is locked, so it's possible to show polkit authentication dialogs
on lock screen for parental controls session limits integration in the
future.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3999>

js/ui/components/polkitAgent.js

index 119f2da66f36054c2b99af37140992ee345d8df0..c1566c2631777a9a5342bee7632273c5e9a5b83d 100644 (file)
@@ -439,8 +439,10 @@ class AuthenticationAgent extends Shell.PolkitAuthenticationAgent {
     }
 
     _onInitiate(nativeAgent, actionId, message, iconName, cookie, userNames) {
-        // Don't pop up a dialog while locked
-        if (Main.sessionMode.isLocked) {
+        // Don't pop up a dialog while locked, unless it's triggered by user
+        // action from the lock screen, such as extending the session limits
+        if (Main.sessionMode.isLocked &&
+            actionId !== 'org.freedesktop.Malcontent.SessionLimits.Extend') {
             Main.sessionMode.connectObject('updated', () => {
                 Main.sessionMode.disconnectObject(this);